package BlogHashBuck;


import java.util.Objects;

class Student {
    public String stuN;
    public Student(String stuN) {
        this.stuN=stuN;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(stuN, student.stuN);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(stuN);
    }
}

public class BlogTest {

    public static void main(String[] args) {
        BlogHashBuck2<Student,Double> hb2=new BlogHashBuck2<Student,Double>();
        Student s1=new Student("2025001");
        hb2.put(s1,99.99);
        Student s2=new Student("2025001");
        System.out.println(hb2.get(s2));
    }

    public static void main2(String[] args) {
        Student s1=new Student("1");
        Student s2=new Student("1");
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());
    }

    public static void main1(String[] args) {
        BlogHashBuck hb=new BlogHashBuck();
        hb.put(1,11);
        hb.put(2,22);
        hb.put(4,44);
        hb.put(5,55);
        hb.put(8,88);
        hb.put(9,99);
        hb.put(14,1414);
        hb.put(24,2424);
        hb.print();
    }
}
